/**
 * Created by Administrator on 2017/8/16.
 */

$(document).ready(function () {

    $(document).on('click','.product-login',login);

    function login() {
        $.ajax({
            url:C.interface.loginin,
            type:'get',
            dataType:'json',
            data:{
                openid:'0'
            },
            success:function (response) {
                if (response.result=='success'){
                    localStorage.setItem('token',response.data.accessToken);
                    C.token=localStorage.getItem('token');
                    //console.log(C.token);
                    window.location.href='discountMail.html';
                }
            }
        })
    }



});